<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //构造函数命名，单词的首字母需要大写
    function CreateMovie(movieName,movietype,movierate,movieshowTime){
        this.movieName = movieName;
        this.movietype = movietype;
        this.movierate = movierate;
        this.movieshowTime = movieshowTime;
        this.getNextShowing =function(){
            var current = 11;
            for(var i = 0;i < this.movieshowTime.length; i++){
                var arrt = parseInt(this.movieshowTime[i])
                if(current < arrt){
                    console.log(this.movieName + "下次播放实现：" + this.movieshowTime[i]);
                    break;
                }
            }
        }
    }
//对象实例化过程 需要使用关键字new
    var movie1 = new CreateMovie("0007","动作",9.0,["9:00","15:00"]);
    movie1.getNextShowing();
</script>
</html>